package com.zking.web.lsc;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import com.zking.dao.domain.Information;
import com.zking.dao.domain.Post;
import com.zking.service.lsc.PostService;

@Controller
public class Postweb {
	@Autowired
	private PostService postService;

	@RequestMapping(value = "/lsc")
	public ModelAndView select(int id,Information information, Post post) {
		ModelAndView modelAndView =new ModelAndView();
			Post ps = postService.selectUserById(id);
			Information ps1 = postService.selectId(id);
			if (ps !=null) {
				modelAndView.addObject("post",ps);
				modelAndView.setViewName("jobdetail");
				
			}
			if (ps1 !=null) {
				modelAndView.addObject("information",ps1);
				modelAndView.setViewName("jobdetail");
				return modelAndView;
			}
			return modelAndView;
	}
	

	
	
}
